
import 'dart:convert';

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:get/get_core/src/get_main.dart';
import 'package:qianyi/controller/homeTabController.dart';
import 'package:qianyi/entity/home/trendVo.dart';
import 'package:qianyi/entity/tags/Item.dart';
import 'package:qianyi/network/http_entity.dart';
import 'package:shared_preferences/shared_preferences.dart';

import '../../../network/base_entity.dart';
import '../../../network/http_config.dart';
import '../../../network/http_manager.dart';
import '../../../ui/widget/custom_refresh_mixin.dart';




class TagsDetailListModel extends ChangeNotifier with CustomRefreshMixin {

  TabController? tabController;

  HomeTabController homeTabController = Get.find();
  String type = "0";

  @override
  Future<List> requestList(int page) async {

    Map<String,String> params1 = {
    };

    params1["id"] = homeTabController.tagDetailId!;
    params1["type"] = type;
    IBaseEntity? result = await HttpManager.getInstance().request(url: "/platform/tag/getImgListByTagId/${page}/10",method: Method.get, params: params1);
    HttpEntity httpEntity = result as HttpEntity;
    TagItemList tagItemList = TagItemList.fromJson(httpEntity.oriData["data"]["records"]);




    notifyListeners();

    return tagItemList.items;
  }

  }
class TagsDetailListModel1 extends ChangeNotifier with CustomRefreshMixin {

  TabController? tabController;

  HomeTabController homeTabController = Get.find();
  String type = "1";

  @override
  Future<List> requestList(int page) async {

    Map<String,String> params1 = {
    };

    params1["id"] = homeTabController.tagDetailId!;
    params1["type"] = type;
    IBaseEntity? result = await HttpManager.getInstance().request(url: "/platform/tag/getImgListByTagId/${page}/10",method: Method.get, params: params1);
    HttpEntity httpEntity = result as HttpEntity;
    TagItemList tagItemList = TagItemList.fromJson(httpEntity.oriData["data"]["records"]);




    notifyListeners();

    return tagItemList.items;
  }

}
